import Layout from '@/layout/index.vue';
export const dynamicRoutes = [
    {
        path: '',
        code: 'eventLayout',
        component: Layout,
        meta: {
            title: '事件中心',
            icon: 'el-icon-tickets',
            roles: ['admin']
        },
        children: [
            {
                path: '/eventManage',
                name: 'EventManage',
                component: () => import('@/views/eventManage/index.vue'),
                meta: {
                    title: '事件管理',
                    roles: ['admin']
                }
            },
            {
                path: '/eventType',
                name: 'EventType',
                component: () => import('@/views/eventType/index.vue'),
                meta: {
                    title: '事件类型管理',
                    roles: ['admin']
                }
            },
            {
                path: '/notice',
                name: 'Notice',
                component: () => import('@/views/notice/index.vue'),
                meta: {
                    title: '公告管理',
                    roles: ['admin']
                }
            },
            {
                path: '/dataChart',
                name: 'DataChart',
                component: () => import('@/views/dataChart/index.vue'),
                meta: {
                    title: '数据分析',
                    roles: ['admin']
                }
            },
        ]
    },
    {
        path: '',
        code: 'warnLayout',
        component: Layout,
        meta: {
            title: '智能预警',
            icon: 'el-icon-warning-outline',
            roles: ['admin']
        },
        children: [
            {
                path: '/warn',
                name: 'Warn',
                component: () => import('@/views/warn/index.vue'),
                meta: {
                    title: '智能预警',
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path: '',
        code: 'assessmentLayout',
        component: Layout,
        meta: {
            title: '部门考核',
            icon: 'el-icon-s-flag',
            roles: ['admin']
        },
        children: [
            {
                path: '/assessment',
                name: 'Assessment',
                component: () => import('@/views/assessment/index.vue'),
                meta: {
                    title: '部门考核',
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path: '',
        code: 'attendLayout',
        component: Layout,
        meta: {
            title: '考勤管理',
            icon: 'el-icon-data-line',
            roles: ['admin']
        },
        children: [
            {
                path: '/classGroup',
                name: 'ClassGroup',
                component: () => import('@/views/attendClassGroup/index.vue'),
                meta: {
                    title: '班组管理',
                    roles: ['admin']
                }
            },
            {
                path: '/attendMember',
                name: 'AttendMember',
                component: () => import('@/views/attendMember/index.vue'),
                meta: {
                    title: '人员管理',
                    roles: ['admin']
                }
            },
            {
                path: '/classSwitch',
                name: 'ClassSwitch',
                component: () => import('@/views/attendClassSwitch/index.vue'),
                meta: {
                    title: '调班管理',
                    roles: ['admin']
                }
            },
            {
                path: '/attendRoadLine',
                name: 'AttendRoadLine',
                component: () => import('@/views/attendRoadLine/index.vue'),
                meta: {
                    title: '考勤路线',
                    roles: ['admin']
                }
            },
            {
                path: '/attendCard',
                name: 'AttendCard',
                component: () => import('@/views/attendCard/index.vue'),
                meta: {
                    title: '考勤设备',
                    roles: ['admin']
                }
            },
            {
                path: '/attendCheckRule',
                name: 'AttendCheckRule',
                component: () => import('@/views/attendCheckRule/index.vue'),
                meta: {
                    title: '考勤规则',
                    roles: ['admin']
                }
            },
            {
                path: '/attendWorkShift',
                name: 'AttendWorkShift',
                component: () => import('@/views/attendWorkShift/index.vue'),
                meta: {
                    title: '排班管理',
                    roles: ['admin']
                }
            },
            {
                path: '/flowInstance',
                name: 'FlowInstance',
                component: () => import('@/views/flowInstance/index.vue'),
                meta: {
                    title: '流程记录',
                    roles: ['admin']
                }
            },
            {
                path: '/attendCheckDay',
                name: 'AttendCheckDay',
                component: () => import('@/views/attendCheckDay/index.vue'),
                meta: {
                    title: '考勤记录',
                    roles: ['admin']
                }
            },
            {
                path: '/attendCheckMonth',
                name: 'AttendCheckMonth',
                component: () => import('@/views/attendCheckMonth/index.vue'),
                meta: {
                    title: '考勤月报',
                    roles: ['admin']
                }
            },
            {
                path: '/timeSegment',
                name: 'TimeSegment',
                component: () => import('@/views/attendTimeSegment/index'),
                meta: {
                  title: '时段管理',
                  icon: 'el-icon-time',
                  affix: true,
                  roles: ['admin'],
                }
            },
            {
                path: '/attendMemberWork',
                name: 'AttendMemberWork',
                component: () => import('@/views/attendMemberWork/index'),
                meta: {
                  title: '人员作业分析',
                  icon: 'el-icon-s-custom',
                  affix: true,
                  roles: ['admin'],
                }
            },
            {
                path: '/attendRoadScore',
                name: 'AttendRoadScore',
                component: () => import('@/views/attendRoadScore/index'),
                meta: {
                  title: '线路周报',
                  icon: 'el-icon-s-data',
                  affix: true,
                  roles: ['admin'],
                }
            },
        ]
    },
    {
        path: '',
        code: 'monitorLayout',
        component: Layout,
        meta: {
            title: '监控管理',
            icon: 'el-icon-video-camera',
            roles: ['admin']
        },
        children: [
            {
                path: '/monitor',
                name: 'Monitor',
                component: () => import('@/views/monitor/index.vue'),
                meta: {
                    title: '监控管理',
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path: '',
        code: 'carLayout',
        component: Layout,
        meta: {
            title: '车辆油费',
            icon: 'el-icon-truck',
            roles: ['admin']
        },
        children: [
            {
                path: '/carInfo',
                name: 'CarInfo',
                component: () => import('@/views/carInfo/index.vue'),
                meta: {
                    title: '车辆信息',
                    roles: ['admin']
                }
            },
            // {
            //     path: '/carFleet',
            //     name: 'CarFleet',
            //     component: () => import('@/views/carFleet/index.vue'),
            //     meta: {
            //         title: '车队管理',
            //         roles: ['admin']
            //     }
            // },
            {
                path: '/carOilFee',
                name: 'CarOilFee',
                component: () => import('@/views/carOilFee/index.vue'),
                meta: {
                    title: '油费登记',
                    roles: ['admin']
                }
            },
            {
                path: '/carRepair',
                name: 'CarRepair',
                component: () => import('@/views/carRepair/index.vue'),
                meta: {
                    title: '维修记录',
                    roles: ['admin']
                }
            },
            {
                path: '/carPolicyRecord',
                name: 'CarPolicyRecord',
                component: () => import('@/views/carPolicyRecord/index.vue'),
                meta: {
                    title: '保单记录',
                    roles: ['admin']
                }
            },
            {
                path: '/carInspectRecord',
                name: 'CarInspectRecord',
                component: () => import('@/views/carInspectRecord/index.vue'),
                meta: {
                    title: '年检记录',
                    roles: ['admin']
                }
            },
        ]
    },
    // {
    //     path: '',
    //     code: 'deviceLayout',
    //     component: Layout,
    //     meta: {
    //         title: '设备管理',
    //         icon: 'el-icon-s-open',
    //         roles: ['admin']
    //     },
    //     children: [
    //         {
    //             path: '/deviceMonitor',
    //             name: 'DeviceMonitor',
    //             component: () => import('@/views/deviceMonitor/index.vue'),
    //             meta: {
    //                 title: '监控管理',
    //                 roles: ['admin']
    //             }
    //         },
    //         // {
    //         //     path: '/deviceCar',
    //         //     name: 'DeviceCar',
    //         //     component: () => import('@/views/deviceCar/index.vue'),
    //         //     meta: {
    //         //         title: '车辆管理',
    //         //         roles: ['admin']
    //         //     }
    //         // },
    //         {
    //             path: '/deviceIntel',
    //             name: 'DeviceIntel',
    //             component: () => import('@/views/deviceIntel/index.vue'),
    //             meta: {
    //                 title: '智能设备',
    //                 roles: ['admin']
    //             }
    //         },
    //     ]
    // },
    {
        path: '',
        code: 'unifyLocationLayout',
        component: Layout,
        meta: {
            title: '统一定位',
            icon: 'el-icon-place',
            roles: ['admin']
        },
        children: [
            {
                path: '/unifyLocation',
                name: 'UnifyLocation',
                component: () => import('@/views/unifyLocation/index.vue'),
                meta: {
                    title: '统一定位',
                    roles: ['admin']
                }
            }
        ]
    },
    {
        path: '',
        code: 'systemLayout',
        component: Layout,
        meta: {
            title: '系统设置',
            icon: 'el-icon-setting',
            roles: ['admin']
        },
        children: [
            {
                path: '/account',
                name: 'Account',
                component: () => import('@/views/systemAccount/index.vue'),
                meta: {
                    title: '部门人员',
                    roles: ['admin']
                }
            },
            {
                path: '/job',
                name: 'Job',
                component: () => import('@/views/systemJob/index.vue'),
                meta: {
                    title: '职位管理',
                    roles: ['admin']
                }
            },
            {
                path: '/rule',
                name: 'Rule',
                component: () => import('@/views/systemRule/index.vue'),
                meta: {
                    title: '角色管理',
                    roles: ['admin']
                }
            },
            {
                path: '/systemConfig',
                name: 'SystemConfig',
                component: () => import('@/views/systemConfig/index.vue'),
                meta: {
                    title: '系统配置',
                    roles: ['admin']
                }
            },
            {
                path: '/device',
                name: 'Device',
                component: () => import('@/views/systemDevice/index.vue'),
                meta: {
                    title: '设备管理',
                    roles: ['admin']
                }
            },
            {
                path: '/dictionary',
                name: 'Dictionary',
                component: () => import('@/views/dictionary/index.vue'),
                meta: {
                    title: '字典管理',
                    roles: ['admin']
                }
            },
            // {
            //     path: '/demo',
            //     name: 'Demo',
            //     component: () => import('@/views/demo/index.vue'),
            //     meta: {
            //         title: 'DEMO',
            //         roles: ['admin']
            //     }
            // }
        ]
    },
    // {
    //     path: window.$setting.djjUrl||'/',
    //     code: 'duijiangji',
    //     component: Layout,
    //     meta: {
    //         title: '对讲机',
    //         icon: 'el-icon-phone-outline',
    //         roles: ['admin']
    //     },
    // },
]
